/*
 *Copyright 2021-2023 NERCIS
 *
 *Licensed under the Apache License, Version 2.0 (the "License");
 *you may not use this file except in compliance with the License.
 *You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 *Unless required by applicable law or agreed to in writing, software
 *distributed under the License is distributed on an "AS IS" BASIS,
 *WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *See the License for the specific language governing permissions and
 *limitations under the License.
 */

package cn.ac.nercis.pes.common.constant.doc;

import org.apache.commons.lang3.StringUtils;

/**
 * 人员管理（单元测评数据表指标列）
 * @author zpy
 * @version 1.0.0
 */
public enum PersonnelManageUnitEvalTarget {
    /**
     * 了解并遵守密码相关法律法规和密码管理制度
     */
    PWD_MANAGE("pwdManageResult","了解并遵守密码相关法律法规和密码管理制度"),
    BUILD_PWD("buildPwdResult","建立密码应用岗位责任制度"),
    BUILD_PERSONNEL("buildPersonnelResult","建立上岗人员培训制度"),
    REGULAR_ASSESSMENT("regularAssessmentResult","定期进行安全岗位人员考核"),
    BUILD_SECURE("buildSecureResult","建立关键岗位人员保密制度和调离制度");

    private final String value;
    private final String text;

    PersonnelManageUnitEvalTarget(String value, String text) {
        this.text = text;
        this.value = value;
    }

    public static PersonnelManageUnitEvalTarget fromText(String text){
        PersonnelManageUnitEvalTarget data = null;
        for(PersonnelManageUnitEvalTarget tt : PersonnelManageUnitEvalTarget.values()){
            if(StringUtils.equals(tt.text,text)){
                data = tt;
                break;
            }
        }
        return data;
    }

    public String getValue(){
        return this.value;
    }

    public String getText(){
        return this.text;
    }
}
